package homework;

import java.text.Format;
import java.text.ParseException;
import java.text.SimpleDateFormat;

public class Judge {
	public static boolean isValidDate(String str) {
		boolean convertSuccess = true;
		SimpleDateFormat sdf = new SimpleDateFormat("MM/dd");
		try {
			sdf.setLenient(false);
			sdf.parse(str);
		} catch (ParseException e) {
			e.printStackTrace();
			System.out.println("生日形式输入错误！");
			convertSuccess = false;
		}
		return convertSuccess;
	}

}
